<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>07_BOM操作</title>
</head>
<body>
    <button onclick="alert('警告框')">弹出警告框</button>
    <button onclick="confirm('确定删除吗？')">弹出警告框</button>
    <script>
        //window对象是浏览器内置的全局对象，可以直接使用其属性和方法
        console.log(parseInt(6.6));//6
        console.log(parseInt('6.6'));//6
        console.log(parseInt('hhh'));//NaN

        console.log(parseFloat(6.6));//6.6
        console.log(parseFloat('6.6'));//6.6
        console.log(parseFloat('hhh'));//NaN
        console.log(parseFloat(6));//6
        //是否为非数字
        console.log(isNaN(6))//false
        console.log(isNaN(6.8))//false
        console.log(isNaN('6'))//false
        console.log(isNaN('hhh'))//true
        console.log(isNaN(NaN))//true
    </script>
</body>
</html>